<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>设备-水处理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<script src="js/jquery-1.8.2.min.js" type="text/javascript">
</script>
		<script src="js/jquery.carouFredSel-6.0.4-packed.js"
			type="text/javascript">
</script>
		<script type="text/javascript" src="js/main.js">
</script>
		<script type="text/javascript" src="js/check.js">
</script>
		<script language="javascript" type="text/javascript"
			src="My97DatePicker/WdatePicker.js">
</script>
	</head>
	<body>

		<s:if test="result != null">
			<script type="text/javascript">
alert('${result}');
window.window.location.href = 'toAdd';
</script>
		</s:if>

		<div class="main">
			<jsp:include page="conter/header.jsp"></jsp:include>
			<div class="certen">
				<jsp:include page="conter/deviceLeft.jsp"></jsp:include>
				<div class="content">
					<div class="mainbar">
						<div class="runbutton">
							<h2>
								<span style="letter-spacing: 20px; margin-left: 32px;">添加设备</span>
							</h2>
							<div class="clr"></div>
						</div>
						<div class="article">
							<form name="form2" action="addtDeviceAction?userId=${userId}"
								method="post">
								<ol>
									<li>
										<label for="deviceNo">
											序列号
										</label>
										<input id="deviceNo" name="deviceNo" class="text"
											onfocus="foucs_deviceNo()" onblur="blur_deviceNo()" />
										<div id="span_deviceNo" class="span1">
											<img src="images/reg1.gif" class="img1" />
											<span class="wenz">请输入序列号</span>
										</div>
									</li>
									<li>
										<label for="deviceName">
											设备名称
										</label>
										<input id="deviceName" name="deviceName" class="text"
											onfocus="foucs_deviceName()" onblur="blur_deviceName()" />
										<div id="span_deviceName" class="span1">
											<img src="images/reg1.gif" class="img1" />
											<span class="wenz">请输入设备名</span>
										</div>
									</li>
									<li>
										<label for="mac">
											Mac地址
										</label>
										<input id="mac" name="mac" class="text" onfocus="foucs_mac()"
											onblur="blur_mac()" />
										<div id="span_mac" class="span1">
											<img src="images/reg1.gif" class="img1" />
											<span class="wenz">请输入Mac地址</span>
										</div>
									</li>
									<li>
										<label for="addTime">
											新建时间
										</label>
										<input type="text" id="addTime" name="addTime"
											onfocus="WdatePicker({dateFmt:'yyyy-MM-dd  HH:mm:ss'})"
											class="Wdate" style="width: 198px" />
									</li>
									<li>
										<label for="deviceArea">
											区域（省）
										</label>
										<select style="width: 200px;" class="s" id="deviceArea"
											name="deviceArea">
											<s:iterator id="tarea" value="#request.tarea">
												<option>
													${name }
												</option>
											</s:iterator>

										</select>
									</li>
									<li>
										<label for="place">
											地址
										</label>
										<input id="place" name="place" class="text"
											onfocus="foucs_place()" onblur="blur_place()" />
										<div id="span_place" class="span1">
											<img src="images/reg1.gif" class="img1" />
											<span class="wenz">请输入地址</span>
										</div>
									</li>
									<li>
										<label for="dadress">
											系统运行数据
										</label>

										<input type=checkbox name="list" id="ph" value="ph" />
										PH值
										<input type=checkbox name="list" id="orp" value="orp" />
										ORP
										<input type=checkbox name="list" id="temperature"
											value="temperature" />
										温度
										<input type=checkbox name="list" id="ec" value="ec" />
										电导率
										<input type=checkbox name="list" id="openEC" value="openEC" />
										开阀电导率
										<input type=checkbox name="list" id="closeEC" value="closeEC" />
										关阀电导率
										<input type=checkbox name="list" id="esil" value="esil" />
										电动阀指示灯
										<input type=checkbox name="list" id="ec1" value="ec1" />PA1运行电流
									   <input type=checkbox name="list" id="ec2" value="ec2" />PA2运行电流
									   <input type=checkbox name="list" id="ec3" value="ec3" />PA3运行电流
									   <input type=checkbox name="list" id="ec4" value="ec4" />PA4运行电流
									   <input type=checkbox name="list" id="ec5" value="ec5" />PA5运行电流
									   <input type=checkbox name="list" id="ec6" value="ec6" />PA6运行电流
									   <input type=checkbox name="list" id="ec7" value="ec7" />PA7运行电流
									   <input type=checkbox name="list" id="ec8" value="ec8" />PA8运行电流
									   <input type=checkbox name="list" id="ec9" value="ec9" />PA9运行电流
									   <input type=checkbox name="list" id="ec10" value="ec10" />PA10运行电流
									   <input type=checkbox name="list" id="ec11" value="ec11" />PA11运行电流
									   <input type=checkbox name="list" id="ec12" value="ec12" />PA12运行电流
									   <input type=checkbox name="list" id="ec13" value="ec13" />PA13运行电流
										<input type=button value="全选"
											onClick="this.value=check(this.form.list)" />

									</li>
									<li>
										<label for="deviceDescribe">
											描述(可输入
											<span id="counter" style="color: red">200</span>字):
										</label>
										<textarea id="deviceDescribe" name="deviceDescribe" rows="8"
											cols="50" onkeyup="checkLength(this);"></textarea>
									</li>
									<li>
										<input type="image" id="btn5" class="send"
											src="images/add.jpg" onclick="this.form.submit()" />
										<input type="image" name="imageres" src="images/raset.jpg"
											class="send1" onclick="reset();return false;" />
										<div class="clr"></div>
									</li>
								</ol>
							</form>
						</div>
					</div>
					<div class="clr"></div>
				</div>
			</div>
			<div class="fbg">
				<div class="fbg_resize">
					<jsp:include page="conter/slide.jsp"></jsp:include>
				</div>
			</div>
			<jsp:include page="conter/footer.jsp"></jsp:include>
		</div>
	</body>
</html>